project(sockport)
cmake_minimum_required(VERSION 2.8)

#not build ZERO_CHECK
#set(CMAKE_SUPPRESS_REGENERATION ON)

set(SRCS ${CMAKE_SOURCE_DIR}/test.cpp)

#set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/target)

#set(INCLUDE_DIRS ${CMAKE_SOURCE_DIR}/include
#                 ${CMAKE_SOURCE_DIR}/src)
set(INCLUDE_DIRS  ${CMAKE_SOURCE_DIR})

include_directories(${INCLUDE_DIRS})
#add_definitions()
#link_directories()
add_executable(${PROJECT_NAME} ${SRCS})

if(WIN32)
  add_definitions(-D_WINSOCK_DEPRECATED_NO_WARNINGS)
  target_link_libraries(${PROJECT_NAME} Ws2_32.lib)
elseif(UNIX)
  SET(CMAKE_CXX_FLAGS "-g -ggdb -O0 -Wall -fPIC")
else(UNIX)
  MESSAGE(SEND_ERROR "unsupported platform")
endif()
